package src;

public class ByteSubstitution {
    public void byte_substitution(byte[] arr) {

        for(int i = 0; i < 16; i++) {
            arr[i] = (byte)(Const.s_box[Byte.toUnsignedInt(arr[i])]);
        }
    }

    public void rev_byte_substitution(byte[] arr) {

        for(int i = 0; i < 16; i++) {
            arr[i] = (byte)(Const.rev_s_box[Byte.toUnsignedInt(arr[i])]);
        }
    }
}
